from pom.mainActivity import MainActivity
from pom.topicActivity import TopicActivity
class Topic:
    def __init__(self):
        self.mainAct = MainActivity()
        self.topicAct = TopicActivity()

    def go_to_tipic_page(self):
        self.mainAct.create_topic_btn.click()

    def create_topic(self,tab,title,content):
        """
        创建话题
        :return:
        """
        self.topicAct.topic_tab.click()
        self.topicAct.topic_choose_tab(tab_name=tab).click()
        self.topicAct.topic_title.clear()
        if title==None:
            title = ''
        self.topicAct.topic_title.send_keys(title)
        self.topicAct.topic_content.clear()
        if content == None:
            content = ''
        self.topicAct.topic_content.send_keys(content)
        self.topicAct.click_action_send()



    def reply_topic(self):
        """
        回复话题
        :return:
        """
        pass

    def topic_detail(self):
        """
        话题详情
        :return:
        """
        pass
